﻿<UserControl x:Class="LuminaDesk.Core.Views.DevSection"
			 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
			 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
			 xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
			 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
			 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
			 xmlns:behaviors="clr-namespace:LuminaDesk.Core.Views.Behaviors"
			 xmlns:controls="clr-namespace:LuminaDesk.Core.Views.Controls"
			 xmlns:properties="clr-namespace:LuminaDesk.Core.Properties"
			 mc:Ignorable="d">
	<UserControl.Resources>
		<ControlTemplate x:Key="Content" TargetType="{x:Type UserControl}">
			<StackPanel Initialized="ContentPanel_Initialized"
						d:Background="DarkGreen">
				<ContentControl Style="{StaticResource MenuItemStyle}">
					<Button Padding="8,4"
							Style="{StaticResource PlainButtonItemStyle}"
							Content="{x:Static properties:Resources.Probe}"
							IsEnabled="{Binding CanProbe, Mode=OneWay}">
						<i:Interaction.Triggers>
							<i:EventTrigger EventName="Click">
								<i:CallMethodAction TargetObject="{Binding}"
													MethodName="PerformProbe"/>
							</i:EventTrigger>
						</i:Interaction.Triggers>
					</Button>
				</ContentControl>

				<ContentControl Style="{StaticResource MenuItemStyle}">
					<Button Padding="8,4"
							Style="{StaticResource PlainButtonItemStyle}"
							Content="{x:Static properties:Resources.Rescan}">
						<i:Interaction.Triggers>
							<i:EventTrigger EventName="Click">
								<i:CallMethodAction TargetObject="{Binding}"
													MethodName="PerformRescan"/>
							</i:EventTrigger>
						</i:Interaction.Triggers>
					</Button>
				</ContentControl>

				<ContentControl Style="{StaticResource MenuItemStyle}">
					<ToggleButton Padding="8,4"
								  Style="{StaticResource CheckButtonItemStyle}"
								  Content="{x:Static properties:Resources.MakeOperation}"
								  IsChecked="{Binding Settings.MakesOperationLog}"/>
				</ContentControl>

				<ContentControl Style="{StaticResource MenuItemStyle}">
					<Button Padding="8,4"
							Style="{StaticResource PlainButtonItemStyle}"
							Content="{x:Static properties:Resources.CopyOperation}">
						<i:Interaction.Triggers>
							<i:EventTrigger EventName="Click">
								<i:CallMethodAction TargetObject="{Binding}"
													MethodName="PerformCopy"/>
							</i:EventTrigger>
						</i:Interaction.Triggers>
					</Button>
				</ContentControl>

				<ContentControl Style="{StaticResource MenuItemStyle}">
					<controls:MultiToggleButton Padding="8,4"
												Style="{StaticResource MultiButtonItemStyle}"
												Content="{x:Static properties:Resources.Arguments}"
												IsCheckable="False">
						<controls:MultiToggleButton.SubContent>
							<TextBox Style="{StaticResource PlainTextBoxStyle}"
									 FlowDirection="LeftToRight"
									 TextWrapping="Wrap" AcceptsReturn="True"
									 MaxLength="256" MaxLines="5"
									 Text="{Binding Arguments, Mode=TwoWay}">
								<i:Interaction.Triggers>
									<i:EventTrigger SourceObject="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}}" EventName="Closed">
										<behaviors:UpdateSourceAction/>
									</i:EventTrigger>
								</i:Interaction.Triggers>
							</TextBox>
						</controls:MultiToggleButton.SubContent>
					</controls:MultiToggleButton>
				</ContentControl>

				<Separator Style="{StaticResource MenuSeparatorStyle}"/>
			</StackPanel>
		</ControlTemplate>
	</UserControl.Resources>

	<d:UserControl.Template>
		<StaticResource ResourceKey="Content"/>
	</d:UserControl.Template>

</UserControl>